from django.contrib import admin

from .models import NoteRecord,NoteType
# Register your models here.


@admin.register(NoteType)
class NoteTypeAdmin(admin.ModelAdmin):
    list_display = ('value',)

@admin.register(NoteRecord)
class NoteRecordAdmin(admin.ModelAdmin):
    list_display = ('title', 'note_type', 'appendix')
    ordering = ('-create_time',)
    list_filter = ('note_type', 'title', 'create_time')
    search_fields = ('title','content')
    list_per_page = 50